
var Tabs = new Class({
    mainTabs: [
        {idx: 0,  mask: 0,     id:'FP', name: 'LogIn',          func: function() { return; } },
        {idx: 1,  mask: 1,     id:'WS', name: 'Web Status',     func: function() { new WebStatus('WS'); } },
        {idx: 2,  mask: 2,     id:'CS', name: 'Customers',      func: function() { new Customers({ 'tagid': 'CS', 'showCalendar':true }); } },
        {idx: 3,  mask: 4,     id:'RD', name: 'Orders',         func: function() { new Orders({'tagid': 'RD'}); } },
        {idx: 4,  mask: 8,     id:'RS', name: 'Resellers',      func: function() { new Resellers({'tagid': 'RS'}); } },
        {idx: 5,  mask: 16,    id:'GG', name: 'Google',         func: function() { new GoogleAdvert({'tagid': 'GG'}); } },
        {idx: 6,  mask: 32,    id:'EP', name: 'Epy',            func: function() { new IncludeTabs({tagid: 'incvTabs'}); } },
        {idx: 7,  mask: 64,    id:'CP', name: 'Coupon',         func: function() { new MakeCoupon({'tagid': 'CP'});} },
        {idx: 8,  mask: 128,   id:'IT', name: 'Items Track',    func: function() { new ItemTracking({'tagid': 'IT'}); } },
        {idx: 9,  mask: 256,   id:'GF', name: 'Google Feeds',   func: function() { new GoogleFeed({'tagid': 'GF'}); } },
        {idx: 10, mask: 512,   id:'IG', name: 'Items On Google',func: function() { new ItemsOnGoogle({'tagid': 'IG'}); } },
        {idx: 11, mask: 16384, id:'UP', name: 'Users profile',  func: function() { new Users({'tagid': 'UP'}); } },
        {idx: 12, mask: 0,     id:'', name: '',                 func: function() { return; } }
    ],
    initialize: function() {
    },
    getTab: function(index) {
        return this.mainTabs[index];
    },
    getTabName: function() {
        var name = [];
        this.mainTabs.each(function(tab, idx) {
            if(idx && tab.name) {
                name.include(tab.name);
            }
        });
        return name;
    },
    getTabMask: function() {
        var mask = [];
        this.mainTabs.each(function(tab, idx) {
            if(idx && tab.name) {
                mask.include(tab.mask);
            }
        });
        return mask;
    },
    getFunction: function(id) {

        var func = null;
        this.mainTabs.each(function(tab) {
            if(tab.id == id) {
                func = tab.func;
            }
        });
        return func;
    }
});
